package com.example.mrwang.fullscreen;

import android.support.v4.app.FragmentActivity;
import android.support.v4.app.FragmentManager;
import android.os.Bundle;
import android.support.v4.app.FragmentTransaction;
import android.view.KeyEvent;
import android.widget.FrameLayout;

public class MainActivity extends FragmentActivity {
    FrameLayout mFLayout;
    FragmentManager mFManage;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        mFLayout = (FrameLayout) findViewById(R.id.button);
        mFManage = getSupportFragmentManager();
        FragmentTransaction fragmentTransaction =
                mFManage.beginTransaction();
        fragmentTransaction.add(R.id.button, new FullFragment());
        fragmentTransaction.commit();
    }

    @Override
    public boolean dispatchKeyEvent(KeyEvent event) {
        return super.dispatchKeyEvent(event);
    }
}
